org.eclipse.vtp.desktop.projects.core.internals
Class VoiceResource

java.lang.Object
  extended by org.eclipse.vtp.desktop.projects.core.internals.VoiceResource
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, ObjectListener, IVoiceToolsResource
Direct Known Subclasses:
ApplicationDesign, ApplicationFragment, BusinessObject, BusinessObjectField, BusinessObjectSet, Database, DatabaseSet, DatabaseTable, DatabaseTableColumn, Dependency, DependencySet, MediaFilesFolder, MediaResource, PromptSet, VoiceToolsProject, WebService, WebServiceOperation, WebServicePort, WebServiceSet, WebServiceType, WebServiceTypeSet

public abstract class VoiceResource
extends java.lang.Object
implements IVoiceToolsResource, ObjectListener

This is a concrete implementation of IVoiceToolsResource and provides the default behavior of that interface.

Version:
2.0
Author:
Trip Gilman

Constructor Summary
VoiceResource()
          Creates a new VoiceResource.
 
Method Summary
 void addRefreshListener(IRefreshListener l)
          Adds the provided refresh listener to the list of listeners that will be notified if this resource should be refreshed.
 void deferEvents()
          Causes all refresh events for this resource to be ingnored until resumeEvents() is called.
protected  void finalize()
           
 java.lang.Object getAdapter(java.lang.Class adapter)
           
protected abstract  java.lang.String getObjectId()
          The object id is used by the event system to uniquely identify a project resource.
 IVoiceToolsProject getProject()
          Returns the top level project object that contains this resource.
 void processObjectEvent(ObjectEvent event)
          Called when an event is generated by the object being listened to.
 void refresh()
          Causes a refresh event to be propigated to all listeners for this resource.
 void removeRefreshListener(IRefreshListener l)
          Removes the provided refresh listener from the list of listeners that will be notified of refresh events.
 void resumeEvents()
          Causes refresh events to once again be propigated to this resources listeners after deferEvents() has been called.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.vtp.desktop.projects.core.IVoiceToolsResource
getName, getParent
 

Constructor Detail

VoiceResource

public VoiceResource()
Creates a new VoiceResource.

Method Detail

getProject

public IVoiceToolsProject getProject()
Description copied from interface: IVoiceToolsResource
Returns the top level project object that contains this resource.

Specified by:
getProject in interface IVoiceToolsResource
Returns:
The containing project

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

getObjectId

protected abstract java.lang.String getObjectId()
The object id is used by the event system to uniquely identify a project resource. In this fashion, multiple references to the resource can be created and still be notified of events.

Returns:
A unique identifier for this resource

deferEvents

public void deferEvents()
Description copied from interface: IVoiceToolsResource
Causes all refresh events for this resource to be ingnored until resumeEvents() is called.

Specified by:
deferEvents in interface IVoiceToolsResource

resumeEvents

public void resumeEvents()
Description copied from interface: IVoiceToolsResource
Causes refresh events to once again be propigated to this resources listeners after deferEvents() has been called. This will automatically generate a refresh event to ensure any changes to this resource while events were defered are propigated to its listeners.

Specified by:
resumeEvents in interface IVoiceToolsResource

addRefreshListener

public void addRefreshListener(IRefreshListener l)
Description copied from interface: IVoiceToolsResource
Adds the provided refresh listener to the list of listeners that will be notified if this resource should be refreshed.

Specified by:
addRefreshListener in interface IVoiceToolsResource
Parameters:
l - The listener to add

removeRefreshListener

public void removeRefreshListener(IRefreshListener l)
Description copied from interface: IVoiceToolsResource
Removes the provided refresh listener from the list of listeners that will be notified of refresh events.

Specified by:
removeRefreshListener in interface IVoiceToolsResource
Parameters:
l - The listener to remove

processObjectEvent

public void processObjectEvent(ObjectEvent event)
Description copied from interface: ObjectListener
Called when an event is generated by the object being listened to.

Specified by:
processObjectEvent in interface ObjectListener
Parameters:
event - The event that occured

refresh

public void refresh()
Description copied from interface: IVoiceToolsResource
Causes a refresh event to be propigated to all listeners for this resource.

Specified by:
refresh in interface IVoiceToolsResource

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable